From: Owen W. Taylor Date: Thu, 9 Oct 2014 18:31:04 +0000 (-0400) Subject: messageTray: add some missing signal disconnections X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2026 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ffdb85e00361780ecea8b4e1b1bdf6647cbe49c8;p=gnome-shell.git messageTray: add some missing signal disconnections Disconnect some signal connections that weren't disconnected on actor destroy (not the result of comprehensive review.) https://bugzilla.gnome.org/show_bug.cgi?id=738256 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index fb0b0ef41..cedb410ed 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1159,6 +1159,7 @@ const SourceActor = new Lang.Class({ this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight)); this.actor.connect('allocate', Lang.bind(this, this._allocate)); this.actor.connect('destroy', Lang.bind(this, function() { + this._source.disconnect(this._iconUpdatedId); this._actorDestroyed = true; })); this._actorDestroyed = false; @@ -1170,7 +1171,7 @@ const SourceActor = new Lang.Class({ this.actor.add_actor(this._iconBin); - this._source.connect('icon-updated', Lang.bind(this, this._updateIcon)); + this._iconUpdatedId = this._source.connect('icon-updated', Lang.bind(this, this._updateIcon)); this._updateIcon(); }, @@ -1228,8 +1229,12 @@ const SourceActorWithLabel = new Lang.Class({ this.actor.add_actor(this._counterBin); - this._source.connect('count-updated', Lang.bind(this, this._updateCount)); + this._countUpdatedId = this._source.connect('count-updated', Lang.bind(this, this._updateCount)); this._updateCount(); + + this.actor.connect('destroy', function() { + this._source.disconnect(this._countUpdatedId); + }); }, _allocate: function(actor, box, flags) {